<form [formGroup]="formModel" novalidate>
    <div class="form-group">
        <label>用户名：</label>
        <input formControlName="userName" />
    </div>

    <div formGroupName="passwords">
        <div class="form-group">
            <label>密码：</label>
            <input formControlName="password" [type]="type" />
            <passwords [pwdData]="pwdStr" (isShow)="show($event)"></passwords>
        </div>

        <div class="form-group">
            <label>确认密码：</label>
            <input formControlName="cpwd" />
        </div>
    </div>

    <div class="form-group">
        <label>姓名：</label>
        <input formControlName="name" />
    </div>

    <div class="form-group">
        <label>身份证号：</label>
        <input formControlName="id" />
    </div>

    <div class="form-group">
        <label>身份证照片上传（人像面）：</label>
        <input type="file" (change)="upload($event)" />
        <input type="button" value="上传" (click)="doupload()" />
    </div>

    <div formGroupName="selectAddress">
        <select formControlName="area">
            <option value="-1">请选择</option>
            <option value="0">请选择1</option>
        </select>

        <select formControlName="street">
            <option value="-1">请选择</option>
            <option value="0">请选择1</option>
        </select>

        <select formControlName="community">
            <option value="-1">请选择</option>
            <option value="0">请选择1</option>
        </select>
    </div>

    <div class="form-group">
        <label>住址：</label>
        <input formControlName="address" />
    </div>


    <div class="form-group">
        <label>手机：</label>
        <input formControlName="tel" />
        <input type="button" value="获取验证码" />
    </div>

    <div class="form-group">
        <label>短信验证码：</label>
        <input formControlName="smsgcode" />
    </div>

    <div class="form-group">
        <input type="checkbox" formControlName="read" />
        <p>我已阅读《青岛养老智慧服务平台用户服务协议》，并资源遵守协议</p>
    </div>

    <button type="button" class="btn btn-default" (click)="subreg()">注册</button>
</form>
{{formModel.value | json}}